Skip to content

fix(regex): faithfully match an empty set of browsers#1583

Merged
dangreen merged 1 commit intobrowserslist:masterfrom
andersk:empty-regex
Apr 5, 2026
Merged

fix(regex): faithfully match an empty set of browsers#1583
dangreen merged 1 commit intobrowserslist:masterfrom
andersk:empty-regex

Conversation

@andersk
Copy link
Copy Markdown
Contributor

@andersk andersk commented Apr 3, 2026

If the query matches no browsers, generate /[]/ which matches nothing rather than /(?:)/ which matches everything.

If the query matches no browsers, generate /[]/ which matches nothing
rather than /(?:)/ which matches everything.

Signed-off-by: Anders Kaseorg <[email protected]>
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.12%. Comparing base (ae3981c) to head (b5a3843).
⚠️ Report is 25 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1583      +/-   ##
==========================================
- Coverage   87.45%   85.12%   -2.33%     
==========================================
  Files          32       29       -3     
  Lines        2144     1365     -779     
  Branches      287      284       -3     
==========================================
- Hits         1875     1162     -713     
+ Misses        269      203      -66     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@dangreen dangreen merged commit 0369751 into browserslist:master Apr 5, 2026
7 of 8 checks passed
@github-actions github-actions Bot mentioned this pull request Apr 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants